package com.gxa.modules.communityManagement.entity;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.gxa.modules.communityManagement.form.HousingManagementForm;
import com.gxa.modules.communityManagement.form.StorageRoomManagementForm;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

@Data
@NoArgsConstructor
@TableName("p_storage_room_management")
public class StorageRoomManagement implements Serializable {
    @TableId(value = "id",type = IdType.AUTO)
    private Integer id;
    @TableField("building_name")
    private String buildingName;
    @TableField("unit_name")
    private String unitName;
    @TableField("storage_room")
    private Integer storageRoom;
    @TableField("usable_area")
    private String usableArea;
    @TableField("built_area")
    private String builtArea;
    @TableField("shared_area")
    private String sharedArea;
    private String note;
    @TableField("community_id")
    private Integer communityId;

    public StorageRoomManagement(StorageRoomManagementForm storageRoomManagementForm) {
        this.id = storageRoomManagementForm.getId();
        this.buildingName = storageRoomManagementForm.getBuildingName();
        this.unitName = storageRoomManagementForm.getUnitName();
        this.usableArea = storageRoomManagementForm.getUsableArea();
        this.builtArea = storageRoomManagementForm.getBuiltArea();
        this.sharedArea = storageRoomManagementForm.getSharedArea();
        this.storageRoom = storageRoomManagementForm.getStorageRoom();
        this.note = storageRoomManagementForm.getNote();
        this.communityId = storageRoomManagementForm.getCommunityId();
    }
}
